﻿<phone:PhoneApplicationPage
    x:Class="TM.QWeibo.Client.Search"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
    xmlns:tm="clr-namespace:TM.QWeibo.Client.UserControls" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot"  Style="{StaticResource PageLayoutGrid}">
        <!--Pivot Control-->
        <controls:Pivot Style="{StaticResource PivotMx}" x:Name="searchPivot">
            <controls:Pivot.Title>
                <StackPanel>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                        <TextBox x:Name="txtKeyword" Width="320" MaxLength="20" Style="{StaticResource MentionUserTextboxStyle}" GotFocus="txtKeyword_GotFocus" LostFocus="txtKeyword_LostFocus" KeyUp="txtKeyword_KeyUp"/>
                        <Button x:Name="btnSearch" Style="{StaticResource MentionUserButtonStyle}" Content="搜索" Click="btnSearch_Click" />
                    </StackPanel>
                    <toolkit:PerformanceProgressBar IsIndeterminate="False" Width="400"  Grid.Row="1"  HorizontalAlignment="Center" x:Name="progressBar" Style="{StaticResource PerformanceProgressBarStyle}"/>
                </StackPanel>
            </controls:Pivot.Title>
            <!--Pivot item one-->
            <controls:PivotItem Padding="12,0,0,0">
                <controls:PivotItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="用户" FontSize="{StaticResource PiovtHeaderFontSize}"/>
                        <TextBlock x:Name="tbUserNum" Text="" Style="{StaticResource HeaderSubText}"/>
                    </StackPanel>
                </controls:PivotItem.Header>
                <tm:SearchUser x:Name="searchUsers"/>
            </controls:PivotItem>

            <!--Pivot item two-->
            <controls:PivotItem Padding="12,0,0,0">
                <controls:PivotItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="微博" FontSize="{StaticResource PiovtHeaderFontSize}"/>
                        <TextBlock x:Name="tbTweetNum" Text="" Style="{StaticResource HeaderSubText}"/>
                    </StackPanel>
                </controls:PivotItem.Header>
                <tm:SearchTweet x:Name="searchTweet"/>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Opacity="0.9">
            <shell:ApplicationBar.MenuItems>
            </shell:ApplicationBar.MenuItems>
			<shell:ApplicationBarIconButton x:Name="btnHome" IconUri="/Resource/Icons/home.png" Text="首页" Click="btnHome_Click"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>